﻿@using KMF.Utility
@using KMF.WebUI.CustomHelpers
@using KMF.WebUI.Models
@model List<KMF.Common.ProductRateByCateTopListPagingDto>
@{
    ViewBag.Title = "ProductByCateL2";
    Layout = "~/Views/Shared/_Layout.cshtml";
   
}

<div class="slider">
    @Html.Action("BannerSlideOnHome", "Banner")
</div>
<div class="product_list">
    <div class="breadcrum">
        <a href="@Url.Action("Index", "Home", new {})l">Trang chủ </a>> <a href="@Url.Action("Index", "CategoryL1", new {})">Sản phẩm</a>
    </div>
    <div class="menu_left">
        @Html.Action("MenuLeft", "CategoryL1")
    </div>
    <div class="product_list_cate">

    <div class="product_cate_title">
        <div class="cate_title">Kết quả<span>(@ViewBag.TotalRecod sản phẩm)</span></div>
        <input type="hidden" class="hidRecordByPage" value="@ViewBag.RecordByPage" />
        <ul class="litsCo ul">
@*            <li>
                <a href="javascript:void(0);" rel="nofollow" idata="OEJHY">Hàng mới</a>
            </li>
            <li>
                <a href="javascript:void(0);" rel="nofollow" idata="ACCEH">Hàng sale</a>
            </li>*@
            <li>
                <a href="javascript:void(0);" rel="nofollow" idata="GJUYR" class="active_type">Tất cả sản phẩm</a>
            </li>
        </ul>
    </div>
    @{     
        <div class="product_tab">
            @if (Model.Any())
            {
                <ul>

                    @foreach (var item in Model)
                    {

                        var pDetailLink = Url.Action("Index", "ProductDetail", new { productId = item.Id, productName = StringUtil.RemoveSpecialCharactersVn(item.Name) });
                        <li>


                            <div class="home_image">
                                <a href="@pDetailLink">
                                    <img src="@item.ImagePath.ImagePathThumb(159, 243)" width="159" height="243" alt="@item.Name" class="lzLoading"/></a>
                                @if (item.PromotionPrice > 0)
                                {
                                    <span class="product_discount">-@item.DiscountPercentage.ToString("#.#")%</span>
                                }

                            </div>
                            <a class="product_title" href="@pDetailLink">@item.Name</a>
                            <span class="home_price">@item.Price.ToString("##,###,###") đ</span>
                            <a href="#" class="home_cart"></a><a href="#" class="home_readmore"></a>
                        </li>
           
                    }

                </ul>
            }
            else
            {
                <div>Không có sản phẩm nào</div>
            }
        </div>
    }
    
</div>

  
    
 


</div>
@section scripts{
    @Scripts.Render("~/bundles/bxSlide")
    @Styles.Render("~/Content/bxSlide")
    @Scripts.Render("~/bundles/categoryProduct")
<script type="text/javascript">
        var currentPage = "product";
    </script>
}